import request from '@/utils/request'

import type {TrademarkPageList,Trademark} from './model/TrademarkModel'

enum Api {
    reqTrademarkPageList = '/admin/product/baseTrademark',
    reqAddTrademarkData = '/admin/product/baseTrademark/save',
    reqChangTrademark = '/admin/product/baseTrademark/update',
    reqDeleteTrademark = '/admin/product/baseTrademark/remove'
}

// 请求初始化数据
export const reqTrademarkPageList = (page:number,limit:number)=>{
    return request.get<any,TrademarkPageList>(`${Api.reqTrademarkPageList}/${page}/${limit}`)
}
//添加品牌的请求
export const reqAddTrademarkData = (trademark:Trademark)=>{
    return request.post<any,null>(Api.reqAddTrademarkData,trademark)
}
//修改品牌的请求
export const reqChangTrademark = (trademark:Trademark)=>{
    return request.put<any,null>(Api.reqChangTrademark,trademark)
}
//删除品牌的请求
export const reqDeleteTrademark = (id:number)=>{
    return request.delete<any,null>(`${Api.reqDeleteTrademark}/${id}`)
}


